﻿using UnityEngine;
using System.Collections;

public class bg_t : MonoBehaviour {

	 private float randomY;

	void Start () {
        RondomWithY();
	}
	
	void Update () {
	
	}
    public void RondomWithY()
    {
        randomY = Random.Range(0.2f,-0.3f);
        this.transform.localPosition = new Vector3(this.transform .localPosition.x,randomY,this.transform.localPosition.z);
    }
    void OnTriggerExit(Collider other) {
        if(other.tag == "Player"){
            GameManger_t.instance.score++;
        }
    }
    void OnGUI() {
        GUILayout.Label("Score:" + GameManger_t.instance.score);
    }

}

